home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / dial4.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1984-09-20  |  9.9 KB  |  223 lines

  1. 4  ' DO NOT DELETE LINES 5 THROUGH 100 UNDER *ANY* CIRCUMSTANCES
  2. 5  '  **********************************
  3. 6  '  ********* VERSION III OF *********
  4. 10  ' **********************************
  5. 20  ' ***** WARGAMES DIALER DELUXE *****
  6. 30  ' **********************************
  7. 40  '    Written By: == PAUL LEVY ==
  8. 45  '  Revisions By: -= Steve Klein =-
  9. 47  '  Revisions By: -= Richard Reisbick =-
  10. 48  '  Revisions By: -= David Gruehn =-
  11. 50  ' **********************************
  12. 60  ' Program designed for the HAYES
  13. 70  ' Smartmodem or compatible.
  14. 75  ' ++++++++++++++++++++++++++++++++++
  15. 80  ' REM's added for convienience to
  16. 85  ' ease the task for later revisions.
  17. 90  ' If you make revisions please
  18. 91  ' increase the version # by 1 and
  19. 92  ' add your name to the others. My
  20. 93  ' revisions (at least the important
  21. 94  ' ones) are noted by SK in their
  22. 95  ' REM statements. - Steve Klein
  23. 96  ' **********************************
  24. 97  ' I've taken the original program and just added the fancy
  25. 98  ' features.  The version 3 just dialed numbers and printed
  26. 99  ' the connects as they came. - David Gruehn
  27. 100  '
  28. 101  ' *********************************
  29. 105  '
  30. 110  COLOR 7,0:CLS:WIDTH 80:KEY OFF:CLEAR:GOSUB 800:CLOSE
  31. 111  NUM1=6 :LINE1=1 :COL1=1 : DIM DIAL$(10) : F1 = 1:Z5$="-": DIM FOUND1(100,4):Q = 18:Y5 = 1:Y6 = 10:DIM FOUND1$(100):F2=1:FE=1
  32. 115  XX=1:LOCATE  9,29:PRINT" Version IV of"
  33. 120  LOCATE 11,25:COLOR 0,7:PRINT"Deluxe Wargames Dialer":LOCATE 12,26:PRINT"Written by Paul Levy":COLOR 7,0:LOCATE 13,24:PRINT"Revisions by Steve Klein"
  34. 125  LOCATE 14,21:PRINT "Revision III by Richard Reisbick"
  35. 126  LOCATE 15,23:PRINT "Revision IV by David Gruehn"
  36. 130  LOCATE 23,10:PRINT"Press 'I' For Instructions Or Any Other Key To Continue":
  37. 140  KE$=INKEY$:IF KE$="" THEN GOTO 140
  38. 145  IF KE$="I" OR KE$="i" THEN GOSUB 600:CLS
  39. 147  GOSUB 700
  40. 148  PRINT:PRINT:PRINT "                     Please enter the following information "
  41. 149  PRINT "________________________________________________________________________________"
  42. 153  FOR E = 1 TO Z
  43. 155      PRINT"Enter The First Three Numbers Or The Area Code And Then The First Three Numbers Of Area/Exchange";E;". ex.: ==> { (XXX)XXX-xxxx OR (xxx)XXX-xxxx}"
  44. 160  LINE INPUT "-> ";DIAL$(E)
  45. 165  NEXT E
  46. 170  PRINT:PRINT "Now Enter The 4th Digit Of The Number.  { (xxx)xxx-4xxx OR xxx-4xxx }"
  47. 180  INPUT "-";A
  48. 190  IF A>9 OR A<0 THEN 170
  49. 200  PRINT:PRINT "Now Enter The 5th Digit Of The Number.  { (xxx)xxx-x5xx OR xxx-x5xx }"
  50. 210  INPUT "-";B
  51. 220  IF B>9 OR B<0 THEN 170
  52. 230  PRINT:PRINT"Now Enter The 6th Digit Of The Number. { (xxx)xxx-xx6x OR xxx-xx6x }"
  53. 240  INPUT "-";C
  54. 250  IF C>9 OR C<0 THEN 170
  55. 260  PRINT:PRINT "Now Enter The 7th Digit Of The Number.  { (xxx)xxx-xxx7 OR xxx-xxx7 }"
  56. 270  INPUT "-";D
  57. 280  IF D>9 OR D<0 THEN 170
  58. 285  FA=A:FB=B:FC=C:FD=D:ED=E:FO=O
  59. 289  E=1
  60. 290  CLS
  61. 291  LOCATE 1,60:PRINT "Save";:LOCATE 1,70:PRINT "Prt." :COLOR 0,7:IF A2=0 THEN LOCATE 1,75:PRINT "OFF"
  62. 292  IF A1=1 THEN LOCATE 1,65:PRINT "ON";"
  63. 293  IF A2=1 THEN LOCATE 1,75:PRINT "ON"
  64. 294  IF A1=0 THEN LOCATE 1,65:PRINT "OFF"
  65. 295  COLOR 7,0:LOCATE 1,32:PRINT "==> AUTO-DIALER <=="
  66. 296  LOCATE 2,1:PRINT "-------------------------------------------------------------------------------":LOCATE 1,2:COLOR 0,7:PRINT "F6";:COLOR 7,0:PRINT "-> Hold":LOCATE 1,15:PRINT "# of Exch.";:COLOR 0,7:PRINT Z:COLOR 7,0
  67. 297  LOCATE 3,3:PRINT "Area/exch: ";DIAL$(E):LOCATE 3,24:PRINT "Attempts:";O:LOCATE 3,44:PRINT "Connections:":LOCATE 3,67:PRINT "Now on:"
  68. 298  TRY.TIME =  18     'NUMBER OF SECONDS TO TRY EACH NUMBER
  69. 299  NUM1=NUM1+1:GOTO 441
  70. 300  CLOSE:COLOR 0,7:LOCATE 5,16:PRINT "DIALING: "DIAL$(E);" ";A;B;C;D
  71. 310  OPEN "COM1:" AS #1:PRINT #1,"AT DT"DIAL$(E);A;B;C;D 'opens com. port and sends # to dial to modem
  72. 360  TIME.ON=TIMER
  73. 380  TIME.NOW=TIMER : LOCATE 5,46:PRINT "Time remaining ";INT(TRY.TIME-(TIME.NOW-TIME.ON)) :IF INT(TIME.NOW-TIME.ON) >= TRY.TIME THEN GOTO 420 '****next dial
  74. 385  L=LOF(1) : IF L<230 THEN GOTO 400 ELSE GOTO 380
  75. 400  BEEP:IF A1=1 THEN GOTO 405 ELSE GOTO 407
  76. 405  OPEN "NUMBERS.DAT" FOR APPEND AS #2:PRINT #2,DIAL$(E);A;B;C;D:CLOSE #2 'Saves number to disk file NUMBERS.DAT- SK
  77. 407  IF A2=1 THEN LPRINT "Comp. Found: "DIAL$(E);A;B;C;D: ELSE GOTO 410  'Checks for Printer Yes/No-SK
  78. 410  GOSUB 900
  79. 415  D=D-1:O1=O1-1:NUM1=NUM1-1
  80. 420  COLOR 7,0:PRINT#1,"+++":FOR I1=1 TO 1000:NEXT I1:PRINT#1,"ATH" '*** Hangs up modem-RAR
  81. 425  CLOSE #1
  82. 430  O1=O1+1:IF O1=O THEN GOTO 1000 'Counts how many #'s have been dialed-SK
  83. 435  D=D+1:IF D=10 THEN D=0:C=C+1:IF C=10 THEN C=0:B=B+1:IF B=10 THEN B=0:A=A+1
  84. 440  CLOSE #1:NUM1=NUM1+1
  85. 441  IF LINE1=5 THEN GOTO 443
  86. 442  GOTO 448
  87. 443  FOR M = 6 TO 23
  88. 445  LOCATE M,1 : PRINT "                                                                              "
  89. 446  NEXT M
  90. 447  NUM1=7:LINE1=1
  91. 448  IF LINE1 = 1 THEN COL1 = 6
  92. 449  IF LINE1 = 2 THEN COL1 = 24
  93. 450  IF LINE1 = 3 THEN COL1 = 42
  94. 451  IF LINE1 = 4 THEN COL1 = 60
  95. 458  LOCATE NUM1,COL1: PRINT DIAL$(E);"-";A;B;C;D:IF NUM1=23 THEN NUM1=6:LINE1=LINE1+1
  96. 459  LOCATE 3,74:PRINT(O1+1):GOTO 300
  97. 460  A=0:B=0:C=0:D=0:KEY OFF:COLOR 7,0
  98. 461  FOR X = 1 TO 4
  99. 462  BEEP
  100. 463  FOR T = 1 TO 200 : NEXT T
  101. 464  NEXT X
  102. 465  GOSUB 5000
  103. 470  PRINT "This Concludes Session For "DIAL$(E)  NUMBERS"
  104. 480  IF A2=1 THEN LPRINT "DIALING COMPLETE"
  105. 500  END
  106. 600  ' The Instructions!-SK  ** rev by RAR
  107. 605  CLS:PRINT:PRINT:PRINT:PRINT:PRINT"A Wargames Dialer is a program that will scan a certain amount of numers in a":PRINT "range defined by the user (such as the first three numbers in you phone #).":PRINT"It scans these numbers for a modem tone, which
  108. 610  PRINT" that there is a":PRINT"computer hooked up. The program then stores the number for later inquiry.":PRINT:PRINT:PRINT"The program will ask you for the number of numbers to be dialed (max. 10,000)":PRINT"and whether or not you want the";
  109. 620  PRINT" numbers also saved to a disk file (NUMBERS.DAT).":PRINT"The disk file can be acessed by entering 'TYPE NUMBERS.DAT' while in DOS."
  110. 625  PRINT"It will also ask whether or not you have a printer (if you answer 'Y' then":PRINT"please turn it on) and whether or not you want the modem speaker on."
  111. 628  PRINT:PRINT:PRINT "It is possible to adjust the time required to make each phone call by":PRINT "changing the variable 'TRY.TIME' to the number of seconds to try.
  112. 635  LOCATE 25,25:PRINT"Press Any Key To Continue..."
  113. 640  KE$=INKEY$:IF KE$="" THEN GOTO 640 ELSE RETURN
  114. 700  ' The Options!- SK
  115. 705  CLS:PRINT"How Many Numbers Should Be Scanned?  (Max. 10000, Min. 1)";:INPUT O
  116. 710  IF O<1 OR O>10000 THEN 700
  117. 720  PRINT:PRINT:INPUT "Should The Numbers Also Be Saved To A Disk File? (Y/N)",A$
  118. 730  IF A$="Y" OR A$="y" THEN A1=1
  119. 740  PRINT:PRINT:INPUT "Do You Want Data Printed As Well As Saved (Y/N)",A$
  120. 750  IF A$="Y" OR A$="y" THEN A2=1
  121. 760  PRINT:PRINT:INPUT "Do You Want The Modem Speaker On? (Y/N)",A$
  122. 770  IF A$="N" OR A$="n" THEN GOTO 780
  123. 772  PRINT:PRINT"How many area codes or exchanges do you wish to try ? "
  124. 773  INPUT"Maximum of 10";Z
  125. 774  ON KEY(6) GOSUB 4000:KEY(6) ON
  126. 775  CLS:RETURN
  127. 780  OPEN "COM1:"AS 1:PRINT#1,"ATM0":CLOSE:GOTO 772 'turns modem speaker off
  128. 800  OPEN "COM1:" AS #1:PRINT#1,"ATS11=40":RETURN 'Sets modem for fast dialing-SK
  129. 900  ' save computer number found
  130. 901  FOUND1$(F1)=DIAL$(E):FOUND1(F1,1)=A:FOUND1(F1,2)=B:FOUND1(F1,3)=C:FOUND1(F1,4)=D
  131. 910  LOCATE 3,56 : PRINT F1
  132. 920  F1 = F1 + 1
  133. 925  RETURN
  134. 1000  ' OPTIONS FOR FOUND #'S
  135. 1001  IF Q4=1 THEN Q4=0:GOTO 1005
  136. 1002  O1=1
  137. 1003  IF Z > 1  THEN FE=FE+1 :GOTO 3000
  138. 1005  BEEP:BEEP:BEEP:BEEP:FOR X = 4 TO 23
  139. 1010  LOCATE X,1:PRINT "                                                                               "
  140. 1015  NEXT X
  141. 1016  LOCATE 6,15: COLOR 0,7:PRINT " The following numbers registered computer tones : "
  142. 1017  COLOR 7,0 : Y4 = 10
  143. 1019  IF F1-1 = 0 THEN GOTO 3500
  144. 1020  FOR F2 = Y5 TO F1-1
  145. 1025  LOCATE Y4,30:PRINT F2;") "; FOUND1$(F2);" ";Z5$;FOUND1(F2,1);FOUND1(F2,2);FOUND1(F2,3);FOUND1(F2,4)
  146. 1030   Y4 = Y4 + 2
  147. 1031  IF Y5 = F1 THEN GOTO 1045
  148. 1033  PRINT
  149. 1035  IF F2 = Q THEN GOTO 1043
  150. 1040  NEXT F2
  151. 1043  Q=Q+9:Y4 = 10 : Y5 = F2
  152. 1045  LOCATE 22,14:COLOR 0,7:PRINT "F1";:COLOR 7,0:PRINT " = Move cursor    ";:COLOR 0,7:PRINT "F2";:COLOR 7,0:PRINT" = Again ?    ";:COLOR 0,7:PRINT "F3";:COLOR 7,0:PRINT " = next group #'s "
  153. 1050  LOCATE 23,25:COLOR 0,7 :PRINT "F4";:COLOR 7,0:PRINT " = End program    ";:COLOR 0,7:PRINT "F5";:COLOR 7,0:PRINT " = Continue"
  154. 1055  LOCATE Y4,24:COLOR 0,7:IF V=1 THEN GOTO 1060 :PRINT "==>":COLOR 7,0
  155. 1060  ON KEY(2) GOSUB 1300
  156. 1065  KEY(2) ON
  157. 1070  ON KEY(3) GOSUB 1400
  158. 1075  KEY(3) ON
  159. 1080  ON KEY(1) GOSUB 1800
  160. 1085  KEY(1) ON
  161. 1090  ON KEY(4) GOSUB 1600
  162. 1095  KEY(4) ON
  163. 1100  ON KEY(5) GOSUB 1700
  164. 1105  KEY(5) ON
  165. 1115  W$ = INKEY$ : IF W$ = "" THEN GOTO 1115
  166. 1300  ' Do it again
  167. 1304  GOTO 110
  168. 1400  ' Print new set of numbers if any
  169. 1405  IF F2 >= F1 THEN GOTO 1430
  170. 1410  GOTO 1005
  171. 1430  LOCATE 20,22:PRINT "That is all the numbers for this attempt"
  172. 1435  GOTO 1060
  173. 1600  ' end program
  174. 1605  GOTO 460
  175. 1700  ' hangs up modem
  176. 1705  COLOR 7,0:GOTO 290
  177. 1800  ' Move Cursor
  178. 1805  LOCATE Y6,24 : PRINT "   "
  179. 1807  IF Y6 = 18 THEN Y6 = 8
  180. 1810  Y6 = Y6 + 2
  181. 1815  LOCATE Y6,24 :COLOR 0,7:PRINT  "==>" :COLOR 7,0
  182. 1825  GOTO 1060
  183. 3000  A=FA:B=FB:C=FC:D=FD:O=FO
  184. 3001  NUM1=6:LINE1=1:COL1=1:Q=18:Y5=1:Y6=10:F2=1:O1=0
  185. 3003  E = E + 1
  186. 3005  IF FE > Z  THEN GOTO 1005
  187. 3010  GOTO 290
  188. 3499  ' *** NO COMPLETIONS ***
  189. 3500  LOCATE 10,24:PRINT "   "
  190. 3501  V=1
  191. 3505  LOCATE 11,34:PRINT "CODES USED"
  192. 3507  LOCATE 13,34:FOR W = 1 TO Z
  193. 3508  PRINT DIAL$(W);SPC(4);
  194. 3509  NEXT W
  195. 3510  LOCATE 14,28:COLOR 0,7:PRINT " Sorry no numbers today "
  196. 3520  COLOR 7,0
  197. 3530  GOTO 1045
  198. 4000  O1=O : Q4=1:COLOR 7,0 :NUM1=6:COL1=1:LINE1=1
  199. 4005  GOTO 1000
  200. 5000  ' Ending
  201. 5005  CLS
  202. 5010  PRINT
  203. 5015  PRINT "                    ////////////////////\\\\\\\\\\\\\\\\\\\\"
  204. 5017  PRINT "               ////////////////////////  \\\\\\\\\\\\\\\\\\\\\\\\"
  205. 5019  PRINT "          /////////////                                \\\\\\\\\\\\\\"
  206. 5020  PRINT "        ////////////////                               \\\\\\\\\\\\\\\\\"
  207. 5021  PRINT "        ///////////////                                 \\\\\\\\\\\\\\\\"
  208. 5022  PRINT "                            DELUXE        WARGAMES                   OO"
  209. 5023  PRINT "                                                                      OO"
  210. 5024  PRINT "                                                                     OO"
  211. 5025  PRINT "                                AUTO  -  DIALER                     OO
  212. 5026  PRINT "                                                                     OO"
  213. 5027  PRINT "                                      1984                            OO"
  214. 5028  PRINT "                                                                    OO"
  215. 5029  PRINT "                                                                   OO"
  216. 5030  PRINT "                                                                    OO"
  217. 5031  PRINT "                                                                     OO"
  218. 5032  PRINT "                                                                    ----"
  219. 5033  PRINT "                                                                   [$$$$"
  220. 5042  PRINT "                                                                  [$$$$$"
  221. 5043  PRINT "                                                                 [$$$$$$"
  222. 5044  PRINT "                              4 12:49   ALIGN   .BAS    822   A 04/24/84 23:21<UNK! {000D}><UNK! {000A}>CRYPT   .DOC   1664   A 02/03/84 23:27   FLASHDNC.BAS   1442   A 04/24/84 23:27<UNK! {000D}><UNK! {000A}>GL      .LBR 105984   A 12/02/84 18:01   COMPRS  .COM    128   A 04/07/84 22:04<UNK! {000D}><UNK! {000A}>COLUMNS .DOC   1152   A 02/03/84 23:40   NOPRTYCK.COM    384   A 04/07/84 22:05<UNK! {000D}><UNK! {000A}>DIR0          66348   A 12/02/84 19:47   FREEPROG.CQT  23321   A 06/17/84 01:56<UNK! {000D}><UNK! {000A}>FARGOUSR.A
  223.